home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / e-tools / plugins / frumsplugs / examples / imagetest.e < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.1 KB  |  40 lines

  1. /* Example of frumSPlugs' Image plugin */
  2. -> $VER: ImageTest.e V1.0 Stephen Sinclair (96.06.16)
  3.  
  4. OPT OSVERSION=37
  5. MODULE 'Tools/EasyGUI','Intuition/intuition','Plugins/Image'
  6.  
  7. PROC main()
  8.   DEF data,img,ip:PTR TO imageplugin
  9.   IF data:=AllocRaster(50,50)
  10.     img:=[0,0,50,50,1,data,$FF,0,NIL]:image
  11.     easygui('Blah',
  12.       [EQROWS,
  13.         [TEXT,'Image:',NIL,TRUE,STRLEN],
  14.  
  15. /* Put an intuition image in the gui with a bevel box around it.  This    **
  16. ** particular image is just a solid colour, but you could give it imagery **
  17. ** simply by giving it a pointer to some bitplane data.                   */
  18.         [BEVEL,[PLUGIN,0,NEW ip.imageplugin(img)]],
  19.         [BUTTON,0,'Quit']
  20.       ]
  21.     )
  22.     FreeRaster(data,50,50)
  23.   ENDIF
  24. ENDPROC
  25.  
  26. CHAR '$VER: ImageTest V1.0 Stephen Sinclair (96.06.16)',0
  27.  
  28. /*
  29. (----) OBJECT image
  30. (   0)   leftedge:INT
  31. (   2)   topedge:INT
  32. (   4)   width:INT
  33. (   6)   height:INT
  34. (   8)   depth:INT
  35. (  10)   imagedata:PTR TO INT
  36. (  14)   planepick:CHAR
  37. (  15)   planeonoff:CHAR
  38. (  16)   nextimage:PTR TO image
  39. (----) ENDOBJECT     /* SIZEOF=20 */
  40. */